package frsf.cidisi.exercise.tp1.search;

import frsf.cidisi.faia.state.EnvironmentState;

/**
 * This class represents the real world state.
 */
public class EstadoActualIsla extends EnvironmentState {
	
    private int PosicionAgente;
    private int PosicionPirata;
    private double[][] Tesoros = {{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0},{0,0,0,0,0}};
    private int[][] mapa = {{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0}};
    private int[][] posicionEnMapa = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}};
    private int[] tesoroPirata = {0,0,0,0,0};
    
    public EstadoActualIsla() {
        
    	this.initState();
    }

    /**
     * This method is used to setup the initial real world.
     */
    @Override
    public void initState() {

    }

    /**
     * String representation of the real world state.
     */
    @Override
    public String toString() {
        String str = "PosicionAgente "+PosicionAgente + "TesorosAldeaActual = ["+getTesoros()[getPosicionAgente()-1][0]+" , "+getTesoros()[getPosicionAgente()-1][1]+" , "+getTesoros()[getPosicionAgente()-1][2]+" , "+getTesoros()[getPosicionAgente()-1][3]+" , "+getTesoros()[getPosicionAgente()-1][4]+"]";

        return str;
    }
  
    //TODO: Complete this section with agent-specific methods
    // The following methods are agent-specific:
	
     public void setTesoroAldea(int indiceAldea, double[] tesoros){
    	 
    	 for(int i=0;i<5;i++){
    		 
    		 this.Tesoros[indiceAldea][i] = tesoros[i];
    		 
    	 }
    	 
     }
     public int getPosicionAgente(){
        return PosicionAgente;
     }
     public void setPosicionAgente(int arg){
        PosicionAgente = arg;
     }
     public int getPosicionPirata(){
        return PosicionPirata;
     }
     public void setPosicionPirata(int arg){
        PosicionPirata = arg;
     }
     public double[][] getTesoros(){
        return Tesoros;
     }
     public void setTesoros(double[][] arg){
        Tesoros = arg;
     }

	public int[][] getPosicionEnMapa() {
		return posicionEnMapa;
	}

	public void setPosicionEnMapa(int[][] posicionEnMapa) {
		this.posicionEnMapa = posicionEnMapa;
	}

	public int[][] getMapa() {
		return mapa;
	}

	public void setMapa(int[][] mapa) {
		this.mapa = mapa;
	}

	public void setTesoroPirata(int[] tesoroPirata) {
		this.tesoroPirata = tesoroPirata;
	}

	public int[] getTesoroPirata() {
		return tesoroPirata;
	}

     

}

